# settings.py

import socket

# 获取当前计算机的IP地址


def get_local_ip():
    return socket.gethostbyname(socket.gethostname())


# 服务端口
SERVICE_PORT = 8000
SERVICE_IP = get_local_ip()
# SERVICE_IP = '127.0.0.1'

# 服务名
SERVICE_NAME = "ocr-service"

# Nacos 配置
NACOS_SERVER_ADDRESS = "127.0.0.1:8848"
NACOS_NAMESPACE = "2567b9ac-b417-4cf9-bb82-1c56a32bf604"
NACOS_DATA_ID = "ocr-service"
NACOS_USERNAME = "nacos"
NACOS_PASSWORD = "nacos"
NACOS_GROUP_NAME = "DEFAULT_GROUP"

# 语言属性
LANG = "ch"  # 例如：中文


def set_lang(new_lang):
    print("设置语言属性为：", new_lang)
    global LANG
    LANG = new_lang
